:host {
  --collapse-display: none;
  --aside-top: 64px;

  @media screen and (max-width: 1200px) {
    --collapse-display: flex;
  }
}

.TDesign-doc-aside {
  position: absolute;
  left: 0;
  top: var(--aside-top);
  height: 100vh;
  width: var(--aside-width, 260px);
  z-index: 1300;
  box-sizing: border-box;
  padding-bottom: 32px;
  background-color: var(--bg-color-container);
  color: var(--text-secondary);
  box-shadow: var(--aside-box-shadow);
  transition: transform .2s var(--anim-time-fn-easing), outline .2s var(--anim-time-fn-easing);
  outline: 9999px solid transparent;

  &.hide {
    transform: translate3d(calc(-1 * var(--aside-width)), 0, 0);
  }

  &.show {
    transform: translate3d(0, 0, 0);
    outline-color: var(--text-disabled);
  }

  &.show + &-mask {
    display: block;
  }

  &::after {
    content: "";
    width: 100%;
    height: 100px;
    position: absolute;
    left: 0;
    bottom: -100px;
    background-color: var(--bg-color-container);
  }

  &__title {
    margin: 8px 12px;
    font-size: 16px;
    height: 40px;
    line-height: 40px;
    font-family: TencentSansW7;
  }

  &__extra {
    max-width: calc(var(--aside-width) - 24px);
    position: relative;
    padding: 0 12px;
    display: block;
  }
}

.TDesign-doc-aside-mask {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 600;
  display: none;
}

.TDesign-doc-aside-collapse {
  position: fixed;
  left: var(--aside-width);
  top: 160px;
  border-radius: 0 3px 3px 0;
  box-shadow: 2px 0 8px rgba(0, 0, 0, .26);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color-container);
  transition: all .2s var(--anim-time-fn-easing);
  display: var(--collapse-display);

  .icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
  }
}
  
.TDesign-doc-sidenav {
  height: 100%;
  padding: 0 0 0 12px;
  overflow: auto;

  &:hover {

    &::-webkit-scrollbar-thumb {
      background-color: var(--bg-color-scroll);
    }
  }

  &::-webkit-scrollbar {
    width: 12px;
    background: transparent;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 6px;
    border: 4px solid transparent;
    background-clip: content-box;
    background-color: transparent;
  }
}
  
.TDesign-doc-sidenav-group {

  &__title {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-placeholder);
    padding: 14px 12px 4px;
    height: 40px;
    box-sizing: border-box;
    position: relative;
    margin-top: 8px;
    border-radius: var(--border-radius);
  }
  
  &__children {
    overflow: hidden;
  }
}

.TDesign-doc-sidenav-item {
  position: relative;
  margin: 4px;
  max-width: calc(var(--aside-width) - 24px);

  .TDesign-doc-sidenav-link {
    display: block;
    height: 40px;
    padding: 0 12px;
    line-height: 40px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all .2s linear;
    gap: 8px;

    &:hover {
      color: var(--text-primary);
      background: var(--bg-color-container-hover);
    }

    &.active {
      color: var(--text-anti);
      background-color: var(--brand-main);

      .TDesign-doc-sidenav-link__tag {
        background: rgba(255, 255, 255, 0.22);
        color: rgba(255, 255, 255, 0.55);
      }
    }

    &__tag {
      font-size: 12px;
      padding: 2px 4px;
      color: #F5BA18;
      border-radius: 3px;
      transition: .2s linear;
      background: rgba(245, 186, 24, 0.1);
    }
  }
}
